package com.qf.controller;
/* stohox
013 7/13 上午 10:00 */

import com.qf.service.CategoryService;
import com.qf.vo.ResultVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@CrossOrigin
@RequestMapping("/index")
public class CategoryController {

    @Autowired
    private CategoryService categoryService;

    //商品分类查询接口
    @GetMapping("/category-list")
    public ResultVO listCatetory(){
        return categoryService.listCategories();
    }
    //商品分类一级查询接口
    @GetMapping("/category-list/{id}")
    public ResultVO selectlistCategories(@PathVariable("id") String id){
        return categoryService.selectFirstLevelCategories(id);
    }
    //商品分类一级查询接口
    @GetMapping("/redis/{id}")
    public ResultVO selectCourse(@PathVariable("id") String id){
        return categoryService.selectCourse(id);
    }



}
